#ifndef USERMANAGER_H
#define USERMANAGER_H

#include <QString>

class UserManager {
public:
    enum Role { Admin, User };

    static UserManager& instance() {
        static UserManager instance;
        return instance;
    }

    UserManager(const UserManager&) = delete;
    UserManager& operator=(const UserManager&) = delete;

    void setUserInfo(const QString &username, const QString &password, Role role) {
        this->username = username;
        this->password = password;
        this->role = role;
    }

    QString getUsername() const { return username; }
    QString getPassword() const { return password; }
    Role getRole() const { return role; }

private:
    UserManager() {}

    QString username;
    QString password;
    Role role;
};

#endif // USERMANAGER_H
